#include <math.h>
#include <stdio.h>
#include <unistd.h>
#ifdef SIMULATOR 
void mainX(int argc, const char **argv, const char **envp)
#else
int main (int argc, char** argv)
#endif
{
  double x = argc;
  double y = argc;
  double z = pow(x,y);
  printf("pow(%f,%f)=%f\n", x, y, z);

#if 0 // only works on x86
  char fpustate[108];
  printf("fpustate=%p\n", fpustate);
  asm volatile ("fsave  %0" :  "=m" ( fpustate) : : "memory");
  asm volatile ("frstor %0" : : "m" (*fpustate));
#endif

#ifdef SIMULATOR
  _exit(0);
#else
  return 0;
#endif
}
